package io.acna.blog.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import io.acna.basedao.mybatis.service.impl.BaseService;
import io.acna.blog.core.CategoryType;
import io.acna.blog.core.IndieSession;
import io.acna.blog.dao.CategoryMapper;
import io.acna.blog.entities.Category;
import io.acna.blog.service.ICategoryService;
import io.acna.mybatis.plugins.core.IndieCondition;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "0.0.1")
public class CategoryService extends BaseService<Category> implements
        ICategoryService {

    private final CategoryMapper categoryDao;
    public static final String COLUMN_NAME = "category_name";
    public static final String FIELD_ID_NAME = "categoryId";

    @Autowired
    public CategoryService(CategoryMapper categoryDao) {
        super(categoryDao, COLUMN_NAME, FIELD_ID_NAME);
        this.categoryDao = categoryDao;
    }

    @Override
    public void save(Category category, IndieSession session) {

    }

    @Override
    public void remove(long id, IndieSession session) {

    }

    @Override
    public void addArticle(long id, long articleId) {

    }

    @Override
    public void delArticle(long id, long articleId) {

    }

    @Override
    public List<Category> findList(IndieCondition condition, CategoryType type) {
        return null;
    }
}
